#ifndef EFFECT_MANAGER_H
#define EFFECT_MANAGER_H

#include "ResourceManager.h"
#include "Effect.h"

namespace Cvekas {

/// Manages effects
class EffectManager : public ResourceManager<EffectPtr>
{
public:
	/// Constructor
	EffectManager(D3DDevicePtr device);

	/// Destructor
	~EffectManager();

	/// Loads effect from file and compiles it.
	/// \param name %Effect name
	/// \param file File with effect description
	EffectPtr load(const std::string& name, const std::string& file);

	/// You shouldn't call this
	void onDeviceLost();
	/// You shouldn't call this
	void onDeviceReset();

private:
	D3DDevicePtr device;
};

typedef boost::shared_ptr<EffectManager> EffectManagerPtr;

} // namespace

#endif